﻿#!/bin/bash
echo >> /root/system_log/system.log
echo >> /root/system_log/system.log
echo '****************System Log****************' >> /root/system_log/system.log
date >> /root/system_log/system.log
echo '****************TOP info****************' >> /root/system_log/system.log
top -b -n 1  >> /root/system_log/system.log
echo '****************UPtime info****************' >> /root/system_log/system.log
uptime  >> /root/system_log/system.log
echo '****************IO info****************' >> /root/system_log/system.log
iostat -xd 1 1 | sed -n '2,$p' >> /root/system_log/system.log
echo '****************MEM info****************' >> /root/system_log/system.log
free -m | grep "Mem" >> /root/system_log/system.log
echo '****************CPU****************' >> /root/system_log/system.log
ps aux|head -1 >> /root/system_log/system.log
ps aux|grep -v PID|sort -rn -k +3|head -5 >> /root/system_log/system.log
echo '****************MEM****************' >> /root/system_log/system.log
ps aux|head -1 >> /root/system_log/system.log
ps aux|grep -v PID|sort -rn -k +4|head -5 >> /root/system_log/system.log
echo '****************Httpd qty****************' >> /root/system_log/system.log
ps aux|grep httpd|wc -l >> /root/system_log/system.log